<?php
//+----------------------------------------------------------------------
//|Author: dtt Date: 2022/3/8 0008 Time: 16:46
//+----------------------------------------------------------------------

use app\http\middleware\AllowOriginMiddleware;
use app\http\middleware\AuthTokenMiddleware;
use think\facade\Route as R;

R::group(function () {
    // 需要令牌认证
    R::group(function () {

    })->middleware(AuthTokenMiddleware::class);
    // 不需要认证
    R::group(function () {

    })->middleware(AuthTokenMiddleware::class, false);
})->middleware(AllowOriginMiddleware::class);